"""
图像增加demo
"""
import numpy as np
from PIL import Image
from PIL._imaging import display
from paddle.vision.transforms import functional as F
from paddle.vision.transforms import RandomRotation


img_path = './work/cat.jpg'

image = Image.open(img_path)

# adjust_brightness对输入图像进行亮度值调整
# new_img = F.adjust_brightness(image,0.4)
# 色调调整
# new_img = F.adjust_hue(image,0.1)

# RandomRotation依据90度，按照均匀分布随机产生一个角度对图像进行旋转
transform = RandomRotation(90)
new_img = transform(image)

# 显示图像
image = image.resize((300,400))
new_img = new_img.resize((300,400))

image.show()
new_img.show()